package com.throwable;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintStream;

public class ThrowableD {
/**
 * 错误日志信息输出
 * @param args
 */
	public static void main(String[] args) {

//		printLog();
		System.out.println(AA.staD());
		System.out.println(new AA().staD());
		
		
		
	}

private static void printLog() {
	String pathname = "C:" + File.separator + "zzz.log";
	File file = new File(pathname);
	try {
		String s = null;
		System.out.println(s.length());
	} catch (Exception ex) {
		int i = 0;
		ex.printStackTrace();
		PrintStream print = null;
		try {
			print = new PrintStream(file);
			ex.printStackTrace(print);
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		} finally {
			if (print != null) {
				print.flush();
				print.close();
			}
			System.out.println("finish");
		}

	}
}
}
